package com.go8.goods.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.go8.goods.mapper.AttributeValueMapper;
import com.go8.goods.pojo.AttributeValue;

@Service
public class AttributeValueServiceImpl implements AttributeValueService {
	@Autowired
	private AttributeValueMapper attributeValueMapper;
	
	@Override
	public void add(AttributeValue attrValue) {
		Date now = new Date();
		attrValue.setGmtCreate(now);
		attrValue.setGmtModified(now);
		attributeValueMapper.insert(attrValue);
	}

	@Override
	public List<AttributeValue> getValuesByAttrId(Long attrId) {
		return attributeValueMapper.selectByAttrId(attrId);
	}

}
